﻿//=================================================================
// Copyright © 2006 Microsoft Corporation. All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//==================================================================
// Project    : Gaee WebFramework
// Description: 
//  系统参数管理类
//  Change History:
//  When        Who         Why
//----------------------------------------------------------------
//  2011/06/23  Julian.Hu     Created. 
//
// © 2010-2011 Microsoft
// All Rights Reserved
//----------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Titan.Runtiming;
using Titan.Data;
using Titan.Logging;
using GaeaWebFramework.Runtime.Core.Entities.SystemMgt;

namespace GaeaWebFramework.Runtime.Core.Services.SystemMgt
{
    public class SysParamsMgtService : RuntimeService
    {
        #region Fields
        private static String _DBNAME = "GaeaWebFramework.DB";
        private SqlHelper sqlhelper = new SqlHelper(_DBNAME);
        private ILogger _logger = new LoggerFactory().GetLogger(typeof(RightMgtService));
        #endregion
        #region Properties

        #endregion
        #region Methods
        public SysParamsMgtService()
        {

        }

        public List<object> getAllSysParams()
        {
            List<object> result = new List<object>();
            SM_SysParams iParam = new SM_SysParams();
            result = (List<object>)sqlhelper.QueryObjects(iParam);
            return result;
        }

        public bool doRefreshSysParams()
        {
            bool result = false;
            return result;
        }

        public bool newSysParamItem(SM_SysParams item)
        {
            bool result = false;
            try
            {
                sqlhelper.Insert(item);
                result = true;
            }
            catch
            {
            }
            return result;
        }
        #endregion
        #region events

        #endregion


    }
}
